home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-12-08 | 43.0 KB | 1,188 lines | [TEXT/R*ch] |
- C.S.M.P. Digest Mon, 03 Aug 92 Volume 1 : Issue 157
-
- Today's Topics:
-
- *ugh* More menu probs
- MBDF Protocol
- 68030 Instruction List wanted
- How to print a postscript file?
- Think C / ANSI Gotcha
- Internationalization of a dialog box
- Magazine Subs Info - Please help
- Converting a Unix Sockets-based program to MacTCP
- How do I dequeue MacTCP calls?
- Does the PolySmooth PicComment work?
- Why is gray drawing slower than color?
-
-
-
- The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
-
- The digest is a collection of article threads from the internet newsgroup
- comp.sys.mac.programmer. It is designed for people who read c.s.m.p. semi-
- regularly and want an archive of the discussions. If you don't know what a
- newsgroup is, you probably don't have access to it. Ask your systems
- administrator(s) for details. (This means you can't post questions to the
- digest.)
-
- Each issue of the digest contains one or more sets of articles (called
- threads), with each set corresponding to a 'discussion' of a particular
- subject. The articles are not edited; all articles included in this digest
- are in their original posted form (as received by our news server at
- cs.uoregon.edu). Article threads are not added to the digest until the last
- article added to the thread is at least one month old (this is to ensure that
- the thread is dead before adding it to the digest). Article threads that
- consist of only one message are generally not included in the digest.
-
- The entire digest is available for anonymous ftp from ftp.cs.uoregon.edu
- [128.223.8.8] in the directory /pub/mac/csmp-digest. The most recent issues
- are available from sumex-aim.stanford.edu [36.44.0.6] in the directory
- /info-mac/digest/csmp. If you don't have ftp capability, the sumex archive
- has a mail server; send a message with the text '$MACarch help' (no quotes)
- to LISTSERV@ricevm1.rice.edu for more information.
-
- The digest is also available via email. Just send a note saying that you
- want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
- automatically receive each new issue as it is created. Sorry, back issues
- are not available through the mailing list.
-
- Send administrative mail to mkelly@cs.uoregon.edu.
-
-
- -------------------------------------------------------
-
- From: mmigdol@ccwf.cc.utexas.edu (michael a migdol)
- Subject: *ugh* More menu probs
- Date: 24 Jun 92 21:24:44 GMT
- Organization: The University of Texas at Austin, Austin TX
-
- Ah, well, another day, another bug, another plea to csmp. :)
-
- The program I'm working on uses a single menu-update routine. Here's the
- meat of it:
-
- void MakeMenu() {
- Handle barHndl;
- MenuHandle menHndl;
-
- /* Reset menus */
- barHndl = GetNewMBar(MyMBarID);
- SetMenuBar(barHndl);
-
- /* Some stuff deleted here */
-
- menHndl = GetMHandle(AppleMenu);
- AddResMenu(menHndl,'DRVR');
- DrawMenuBar();
- }
-
- The stuff in the deleted section works fine, but when this routine is called
- for the second time, GetMHandle(AppleMenu) returns a zero, leading to a
- generally chaotic state of the universe in which the apple menu has several
- copies of the DA list floating around in it. :)
-
-
- Any suggestions would be greatly appreciated. I'll post any interesting replies
- back to the group.
- Thanks in advance!
- - -Michael
-
- +++++++++++++++++++++++++++
-
- From: mmigdol@ccwf.cc.utexas.edu (michael a migdol)
- Date: 24 Jun 92 22:18:34 GMT
- Organization: The University of Texas at Austin, Austin TX
-
- Ok, everyone, repeat after me....
- "Think Reference is not a substitute for Inside Mac"
- "Think Reference is not a substitute for Inside Mac"
- "Think Reference is not a substitute for Inside Mac"
-
- Thanks to Stepan Riha for pointing out that it's a no-no to call GetNewMBar
- more than once. (A fact that's mentioned in IM I, but not TR) :)
-
- Is it Friday yet?
- - -Michael
-
-
- +++++++++++++++++++++++++++
-
- From: Stephan Bublava <krapf@email.tuwien.ac.at>
- Organization: Fachschaft Informatik, TU Wien
- Date: Thu, 25 Jun 1992 12:15:54 GMT
-
- >The program I'm working on uses a single menu-update routine. Here's the
- >meat of it:
- >
- >void MakeMenu() {
- > Handle barHndl;
- > MenuHandle menHndl;
- >
- > /* Reset menus */
- > barHndl = GetNewMBar(MyMBarID);
- > SetMenuBar(barHndl);
- >
- > /* Some stuff deleted here */
- >
- > menHndl = GetMHandle(AppleMenu);
- > AddResMenu(menHndl,'DRVR');
- > DrawMenuBar();
- >}
-
- I suppose by "menu-update routine" you mean a routine that disables and
- enables menu items. In such a routine there is no need to call GetNewMbar.
- In fact I call GetNewMBar only once in my programs (but i use only one
- menu bar.)
-
- The listing looks like a routine that initializes the menus at programm
- startup. By the way you should also call DisposeHandle (barHndl) at the
- end of your routine because SetMenuBar makes a copy of the handle you
- pass it.
-
- If you really want do disable and enable menu items do someting like the
- following:
-
- menHandle := GetMHandle (menu_id);
- DisableItem (menHandle, item_number);
- ...
-
- If this is not what you want to do, please specify the purpose of your
- routine in more detail.
-
- Hope this helps,
-
- Stephan Bublava
- krapf@email
-
- +++++++++++++++++++++++++++
-
- From: dan@umiami.ir.miami.edu
- Date: 29 Jun 92 15:10:05 GMT
- Organization: Univ of Miami IR
-
- In article <74575@ut-emx.uucp>, mmigdol@ccwf.cc.utexas.edu (michael a migdol) writes:
-
- > Thanks to Stepan Riha for pointing out that it's a no-no to call GetNewMBar
- > more than once. (A fact that's mentioned in IM I, but not TR) :)
-
- As a side note: Remember menu ID's and MENU resource ID's don't necessarily
- match. If you create a MENU in ResEdit, they will match initially if there are
- no resource conflicts. But if you start changing menus around, they can end up
- different. This can cause all sorts of problems that would be hard to diagnose
- if you didn't know about the ID problem. Just thought I'd point that out :)
-
- Dan
- /-------------------------------------------------------------------------\
- | Dan Weisman - University of Miami - Florida | || || || || |
- |--------------------------------------------------| || || ||\ /|| |
- | INTERNET -----> dweisman@umiami.IR.Miami.edu | || || || | || |
- | BITNET -----> dweisman@umiami | ||||||| || | || |
- |-------------------------------------------------------------------------|
- | "Think for yourself and feel the walls become sand beneath your feet" |
- | -Queensryche, "Anybody Listening" |
- \_________________________________________________________________________/
-
- +++++++++++++++++++++++++++
-
- From: lari@bach.cs.unc.edu (Humayun Lari)
- Date: 29 Jun 92 17:04:53 GMT
- Organization: University of North Carolina, Chapel Hill
-
- In article <1992Jun29.111006.13623@umiami.ir.miami.edu> dan@umiami.ir.miami.edu writes:
- >As a side note: Remember menu ID's and MENU resource ID's don't necessarily
- >match. If you create a MENU in ResEdit, they will match initially if there are
- >no resource conflicts. But if you start changing menus around, they can end up
- >different. This can cause all sorts of problems that would be hard to diagnose
-
- A good way to prevent this from happening (at least in ResEdit 2.1.1) is to
- remember to always open the menu before choosing Get Resource Info to set
- the resource ID. ResEdit will warn you that the internal menu ID is different
- from the new resource ID and ask if you want to change that too; just hit
- Return and it'll do it for you. Nicely done, but IMHO you shouldn't have to
- open the menu first...
-
- >...Just thought I'd point that out :)
-
- Just thought I'd point this out. :-)
-
-
- Humayun Lari
- (lari@cs.unc.edu)
-
- ---------------------------
-
- From: leban@graviton.lcs.mit.edu (Bruce Leban)
- Subject: MBDF Protocol
- Date: 25 Jun 92 16:47:27 GMT
- Organization: lcs.mit.edu
-
- I have a question about the protocol for calling an MBDF. The GetRect
- message does not appear to work as documented.
-
- The MBDF itself is documented as returning a longint, but the GetRect
- message is documented as returning a rect. Clearly a rect cannot fit in a
- longint. (The MBDF is documented at the end of the Menu Manager chapter in
- volume V; I think the respective page numbers are 251 and 254, but the book
- is at home.) I've examined the value actually returned by the MBDF and it
- appears to be neither a pointer nor a handle to a rect. I've tried passing
- a pointer to a rect as an extra first or last parameter and neither works.
- (Incidentally, I'm calling this from Think C.) Does anyone know how this is
- really supposed to work?
-
- I have looked through all 6 volumes of Inside Mac and the most recent
- version of the Tech Notes stack downloaded from ftp.apple.com and I cannot
- find any explanation.
-
- Thanks for any help.
-
- --- Bruce
- Leban@graviton.lcs.mit.edu @somerville.mass.usa.earth
-
- +++++++++++++++++++++++++++
-
- From: keith@taligent.com (Keith Rollin)
- Date: 26 Jun 92 18:37:18 GMT
- Organization: Taligent
-
- In article <1992Jun25.164727.17171@mintaka.lcs.mit.edu>,
- leban@graviton.lcs.mit.edu (Bruce Leban) writes:
- >
- > I have a question about the protocol for calling an MBDF. The GetRect
- > message does not appear to work as documented.
- >
- > The MBDF itself is documented as returning a longint, but the GetRect
- > message is documented as returning a rect. Clearly a rect cannot fit in a
- > longint. (The MBDF is documented at the end of the Menu Manager chapter in
- > volume V; I think the respective page numbers are 251 and 254, but the book
- > is at home.) I've examined the value actually returned by the MBDF and it
- > appears to be neither a pointer nor a handle to a rect. I've tried passing
- > a pointer to a rect as an extra first or last parameter and neither works.
- > (Incidentally, I'm calling this from Think C.) Does anyone know how this is
- > really supposed to work?
- >
- > I have looked through all 6 volumes of Inside Mac and the most recent
- > version of the Tech Notes stack downloaded from ftp.apple.com and I cannot
- > find any explanation.
-
- The MBDF is returning a pointer to a rect. Often, this is a pointer to a
- low-memory global. Other times, it's to a rect in a private MBDF data structure.
-
- BTW: I'm not sure if MBDF writing is supported. There are many messages that the
- Menu Manager sends to the MBDF that aren't documented anywhere. I only know this
- because I've been disassembling the 7.0 MBDF so that I, too, can write my own
- :-).
-
- Perhaps someone with access to the new Inside Mac can tell us what the
- documentation for the 90's says.
-
- - --
- Keith Rollin
- Phantom Programmer
- Taligent, Inc.
-
-
- ---------------------------
-
- From: kevin@crash.cts.com (Kevin Hill)
- Subject: 68030 Instruction List wanted
- Date: 25 Jun 92 16:14:51 GMT
- Organization: Crash TimeSharing, El Cajon, CA
-
-
- I am curious, does someone out in netland have file that has all
- the opcodes for the 68000 family? can you send it to me? Preferably,
- it will have info on each instruction (i.e. what regs are used in the
- opcode)
- If no one has heard of such a thing, perhaps mention a good book that
- goes over it all...
- -Kevin
-
- +++++++++++++++++++++++++++
-
- From: niko@iastate.edu (Nikolaus E Schuessler)
- Organization: Iowa State University, Ames, IA
- Date: Fri, 26 Jun 1992 02:16:46 GMT
-
- In article <1992Jun25.161451.20442@crash.cts.com> kevin@crash.cts.com (Kevin Hill) writes:
- > I am curious, does someone out in netland have file that has all
- >the opcodes for the 68000 family? can you send it to me? Preferably,
- >it will have info on each instruction (i.e. what regs are used in the
- >opcode)
- > If no one has heard of such a thing, perhaps mention a good book that
- >goes over it all...
- > -Kevin
- >
-
- Even better than a file, you can have the 'official' Motorola documentation
- by calling / writing them... It will cost you almost nothing -- If you
- are involved with a educational institution of some sort and you ask nice,
- they may even send it to you for free...
-
- You want the "Enhanced 32-Bit Microprocessor User's Manual" -- what they want
- to know is the following part number: MC68030UM/AD (for the 68030)
-
- I don't know if the ISBN will help or not but anyway here it is:
- ISBN 0-13-566423-3 (again for the 68030)
-
- There is also the 68000 Programmers Reference Manual which also seems
- to include FPU instructions (M68000PM/AD).
-
- Hope this helps!
- - --
- Niko Schuessler niko@iastate.edu
- Project Vincent Systems Manager
- Iowa State University voice: 294-1672
- Ames IA 50010
-
- +++++++++++++++++++++++++++
-
- From: ksand@apple.com (Kent Sandvik (Hacker))
- Date: 1 Jul 92 01:40:07 GMT
- Organization: Apple
-
- In article <1992Jun25.161451.20442@crash.cts.com>, kevin@crash.cts.com
- (Kevin Hill) wrote:
- > I am curious, does someone out in netland have file that has all
- > the opcodes for the 68000 family? can you send it to me? Preferably,
- > it will have info on each instruction (i.e. what regs are used in the
- > opcode)
- > If no one has heard of such a thing, perhaps mention a good book that
- > goes over it all...
- > -Kevin
-
- 68030 Assembly Language Reference, by Williams, has MPW 68000 asm code in
- the book. Or then the Motorola specs.
-
- Kent Sandvik/DTS
-
- ---------------------------
-
- From: dank@calvin.usc.edu (Dan King)
- Subject: How to print a postscript file?
- Date: 25 Jun 92 03:58:21 GMT
- Organization: University of Southern California, Los Angeles, CA
-
-
-
- Howdy, y'all. A quick question: What's the easiest way to print a
- postscript file from within a program?
-
- The situation:
- I've got a program that is reading a MacTCP stream (which is just a
- postscript file that a Unix box is vomiting at me). I want to redirect
- this stream to a LaserWriter. (Yes, it's a poor man's print spooler,
- but there are a few other added complexities that make me unable to use
- any commercial product I've seen.)
-
- Is there a quick and easy solution?
-
- Thanks,
- dank
-
- +++++++++++++++++++++++++++
-
- From: de19@umail.umd.edu (Dana S Emery)
- Date: 26 Jun 92 03:46:41 GMT
- Organization: Personal
-
- In article <l4k29tINN1kh@calvin.usc.edu>, dank@calvin.usc.edu (Dan King) writes:
- >
- > I've got a program that is reading a MacTCP stream (which is just a
- > postscript file that a Unix box is vomiting at me). I want to redirect
- > this stream to a LaserWriter.
- >...
- > Is there a quick and easy solution?
-
- Not unless Adobe has upgraded the SendPS utility to accept Apple events.
-
- Baring that:
-
- You will have to parse the stuff (hopefully it will follow the adobe
- structured comment conventions). You can emit PS either of 2 ways.
-
- 1 - via pic comments.
- 2 - via drawtext/drawchar/drawstring, with font set to 'Postscript_Escape'
- (special font which your code should supply, see LW driver 'STR ' -8188 for
- actual name, I think Sumex has an FTP'able example.)
-
- The LW driver will ignore the content of the PS, and so it falls on your code
- to ensure that fonts not inline with the PS stream are supplied.
-
- Your parsing will have 2 objectives.
-
- 1 - establishing font requirements.
- 2 - isolateing pages for emision (remember, the LW driver reserves the
- pagination and header emission for itself.)
-
- You may have to buffer to disk in order to deal with the 'AtEnd' convention.
-
- Good luck, Dana S Emery (de19@umail.umd.edu)
-
- ---------------------------
-
- From: pgc@po.CWRU.Edu (Peter G. Cramer)
- Subject: Think C / ANSI Gotcha
- Date: 25 Jun 92 18:19:49 GMT
- Organization: Case Western Reserve University, Cleveland, OH (USA)
-
-
- I have run across a gotcha in Think C related to the use
- of ANSI standard routines. The bottom line is that if
- you are using ANSI functions, make sure "native floating
- point format" under "Compiler Settings" is turned OFF!
- (at least in version 5.0.)
-
- If you want to try it for yourself, here is a program
- you can use:
- - --------------------
- #include <stdio.h>
-
- main()
- {
- char *s = "3.14159";
- float myVar;
-
- sscanf( s, "%f", &myVar );
- printf( "myVar = %f\n", myVar );
- }
- - -------------------
-
- I guess it's not so surprising that this is the case. If it isn't
- mentioned in the manuals (I haven't seen it), it should be.
-
- Best,
- - --
- Peter G. Cramer, Physics Department, CWRU
- University Circle Cleveland, Ohio 44106
- (216) 368-3656 pgc@po.cwru.edu
-
- +++++++++++++++++++++++++++
-
- From: scott@mcl.ucsb.edu (Scott Bronson)
- Date: 29 Jun 92 19:55:35 GMT
-
- In <1992Jun25.181949.28946@usenet.ins.cwru.edu> pgc@po.CWRU.Edu (Peter G. Cramer) writes:
-
-
- >The bottom line is that if
- >you are using ANSI functions, make sure "native floating
- >point format" under "Compiler Settings" is turned OFF!
- >If it isn't mentioned in the manuals (I haven't seen it), it should be.
-
-
- If this isn't in the FAQ, it should be.
-
- Though the THINK manual doesn't go out of its way to document this, it
- is certainly in there. If you browse the index for five or ten minutes
- you will eventually find out where this is described. Sorry I don't have
- the manual here at school, or I could tell you right now.
-
- If you change the "mc -68881/882" or "Use Native Floating Point" options
- from their default values, you must re-compile the ANSI libraries or their
- object code will not reflect the format you are using for your source
- (whether or not you are using SANE's 80-bit extendeds or Motorola FPU's
- 96-bit ones).
-
- - Scott
-
- ---------------------------
-
- From: resnick@cogsci.uiuc.edu (Pete Resnick)
- Subject: Internationalization of a dialog box
- Date: 25 Jun 92 18:57:54 GMT
- Organization: University of Illinois at Urbana
-
- I have a piece of code which I am hoping to make as
- "internationalizable" as possible. Most of the stuff in the Script
- Manager I am having no problems with, but I have run into two problems
- concerning text in a Modal dialog box for which I cannot find the
- answer. This code, by the way, must run under System 6 as well as
- System 7.
-
- 1. I have a few TE boxes in this dialog. One of them can take any sort
- of printable text and the others can take only numerals (i.e. things I
- can convert to numbers in the program). I want to give some feedback
- to the user from within my dialog filter by flagging keystrokes that
- are no good and beeping. This would mean not allowing non-printables
- in the first box and not allowing non-digits in the others. The
- problem is that I could get double-byte characters, i.e. two separate
- events. What is the best way to handle this? Can I filter the way I
- want to, or do I basically have to let the user enter what they want
- and go back and complain once they hit "OK"?
-
- 2. I am going to draw some text in a small box in my dialog. The box
- is just a userItem in my DITL which I will do a FrameRect; it will be
- wide enough for the longest possible string. What I am having a
- problem with is how to actually draw the text. If I am in a
- left-to-write script, I simply move to the left side of the box and
- call DrawText. But if I am in a right-to-left script, where do I start
- my DrawText? Should I start at the right side of the box, or
- MeasureText pixels from the right side? Is there an cleaner way to do
- this?
-
- Sample code would be appreciated, but ideas are really what I am
- looking for.
-
- pr
- - --
- Pete Resnick (...so what is a mojo, and why would one be rising?)
- Graduate assistant - Philosophy Department, Gregory Hall, UIUC
- System manager - Cognitive Science Group, Beckman Institute, UIUC
- Internet: resnick@cogsci.uiuc.edu
-
- +++++++++++++++++++++++++++
-
- From: leonardr@ccs.itd.umich.edu
- Organization: Campus Computing Sites, University of Michigan-Ann Arbor
- Date: Fri, 26 Jun 92 02:34:27 GMT
-
- In article <BqF0oL.L12@news.cso.uiuc.edu> resnick@cogsci.uiuc.edu (Pete Resnick) writes:
- >I have a piece of code which I am hoping to make as
- >"internationalizable" as possible. Most of the stuff in the Script
- >Manager I am having no problems with, but I have run into two problems
- >concerning text in a Modal dialog box for which I cannot find the
- >answer. This code, by the way, must run under System 6 as well as
- >System 7.
- >
- No problem....
-
- >1. I have a few TE boxes in this dialog. One of them can take any sort
- >of printable text and the others can take only numerals (i.e. things I
- >can convert to numbers in the program). I want to give some feedback
- >to the user from within my dialog filter by flagging keystrokes that
- >are no good and beeping. This would mean not allowing non-printables
- >in the first box and not allowing non-digits in the others. The
- >problem is that I could get double-byte characters, i.e. two separate
- >events. What is the best way to handle this? Can I filter the way I
- >want to, or do I basically have to let the user enter what they want
- >and go back and complain once they hit "OK"?
- >
- Take a look at the CharByte() routine (somewhere in IM V). It will
- tell you whether you are looking at the first byte of a 2-byte character,
- the 2nd byte of a two byte character or a single byte character. There should
- also be an example of using it in either IM V or VI.
-
- >2. I am going to draw some text in a small box in my dialog. The box
- >is just a userItem in my DITL which I will do a FrameRect; it will be
- >wide enough for the longest possible string. What I am having a
- >problem with is how to actually draw the text.
- >
- What I usually do is to use _TextBox, which admittedly uses TextEdit
- to do the drawing, but since you are talking about a small amount of text
- it will work just fine. That way TE gets to worry about all the issues and
- you can get justifications (jeft/center/right) if you want.
-
-
- - --
- - -----------------------------------------------------------------------
- Leonard Rosenthol Internet: leonardr@ccs.itd.umich.edu
- Director of Advanced Technology AppleLink: MACgician
- Aladdin Systems, inc. GEnie: MACgician
-
- +++++++++++++++++++++++++++
-
- From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
- Organization: Kalamazoo College
- Date: Fri, 26 Jun 1992 14:51:39 GMT
-
- leonardr@ccs.itd.umich.edu writes:
- >resnick@cogsci.uiuc.edu (Pete Resnick) writes:
- >>
- >>I have a piece of code which I am hoping to make as
- >>"internationalizable" as possible. ... but I have run into two problems
- >>concerning text in a Modal dialog box ...
- >>
- >>2. I am going to draw some text in a small box in my dialog. The box
- >>is just a userItem in my DITL which I will do a FrameRect; it will be
- >>wide enough for the longest possible string. What I am having a
- >>problem with is how to actually draw the text.
- >>
- > What I usually do is to use _TextBox, which admittedly uses TextEdit
- >to do the drawing, but since you are talking about a small amount of text
- >it will work just fine. That way TE gets to worry about all the issues and
- >you can get justifications (jeft/center/right) if you want.
-
- You might want to check out NeoTextBox, Bryan Ressler's improvement on
- that trap. I'm not that "up" on internationalization, but Bryan makes
- lots of references to the Script Manager in his code, so it must be
- good. :-)
-
- It's in the Winter 1992 develop (if you're in the Northern Hemisphere).
- - --
- Jamie McCarthy Internet: k044477@kzoo.edu AppleLink: j.mccarthy
- Never piss off a computer.
-
- +++++++++++++++++++++++++++
-
- From: leonardr@ccs.itd.umich.edu
- Organization: Campus Computing Sites, University of Michigan-Ann Arbor
- Date: Fri, 26 Jun 92 17:53:00 GMT
-
- In article <1992Jun26.145139.22530@hobbes.kzoo.edu> k044477@hobbes.kzoo.edu (Jamie R. McCarthy) writes:
- >leonardr@ccs.itd.umich.edu writes:
- >>resnick@cogsci.uiuc.edu (Pete Resnick) writes:
- >>>
- >>> [drawing international text in a box]
- >>>
- >> What I usually do is to use _TextBox, which admittedly uses TextEdit
- >>to do the drawing, but since you are talking about a small amount of text
- >>it will work just fine. That way TE gets to worry about all the issues and
- >>you can get justifications (jeft/center/right) if you want.
- >
- >You might want to check out NeoTextBox, Bryan Ressler's improvement on
- >that trap. I'm not that "up" on internationalization, but Bryan makes
- >lots of references to the Script Manager in his code, so it must be
- >good. :-)
- >
- If memory serves me correctly, the NeoTextBox stuff is NOT
- Script Manager compatible - though it is fast and does do full justification.
- I know someone who has done a bit of "internationalizatiion" to NTB, but it
- still has a way to go.
-
-
- - --
- - -----------------------------------------------------------------------
- Leonard Rosenthol Internet: leonardr@ccs.itd.umich.edu
- Director of Advanced Technology AppleLink: MACgician
- Aladdin Systems, inc. GEnie: MACgician
-
- +++++++++++++++++++++++++++
-
- From: resnick@cogsci.uiuc.edu (Pete Resnick)
- Organization: University of Illinois at Urbana
- Date: Sun, 28 Jun 1992 00:02:12 GMT
-
- Thanks to Leonard, Jamie, and Dana for some answers and ideas.
-
- 1. For the numbers, CharType seems to work fine, though I have not
- tested it on an interational machine yet. I think this will do it for
- me.
-
- 2. As far as drawing text in my box goes: Though I used the TE
- routine TextBox elsewhere in my code (thanks for pointing that one
- out), it turns out that I need to do manipulation on the text in the
- original item I was asking about. So, I am checking GetSysJust() and
- doing some Char2Pixel's and drawing it by hand. The Script Manager
- routines are working out great!
-
- pr
- - --
- Pete Resnick (...so what is a mojo, and why would one be rising?)
- Graduate assistant - Philosophy Department, Gregory Hall, UIUC
- System manager - Cognitive Science Group, Beckman Institute, UIUC
- Internet: resnick@cogsci.uiuc.edu
-
- ---------------------------
-
- From: csandy@cybaswan.UUCP (ap.parkman)
- Subject: Magazine Subs Info - Please help
- Date: 25 Jun 92 14:40:03 GMT
-
- I am a programmer interested in obtaining some overseas
- subscriptions to U.S. Mac Magazines such as MacWorld/MacUser
- which impressed me on a recent visit as being:
-
- * Ahead of the U.K. versions in terms of News
- * Bigger coverage then U.K. versions in terms of more
- useful articles
- * Useful for keeping an eye on U.S. Prices for comparison
- with U.K. Pricing
-
- To speed the process of obtaining such a subscription I would
- ideally like to FAX a subscription request payable against my
- MasterCard. I was wondering:
-
- - What other magazines do you suggest I consider?
- - Could anyone be kind enough to send me the FAX
- numbers of the relevant subscription departments
- ( including MacWorld and MacUser )
-
- You could e-mail me the responses if you prefer, although I
- suspect an airing of the matter could prove interesting to
- many readers of magazines who are unaware of the relative
- merits of alternatives. If there is a good response I'll
- summarise the opinions about each magazine.
-
- Yours in hopeful anticipation.
-
- Andy Parkman
-
- Research Programmer,
- Dept. of Computer Science,
- Univ. Coll. of Swansea,
- Singleton Park,
- Swansea. SA2 8PP.
- U.K.
-
- e-mail: csandy@uk.ac.swan.pyr
-
- +++++++++++++++++++++++++++
-
- From: buckeye@spf.trw.com (John Wallace)
- Organization: TRW Data Systems Center, Redondo Beach, CA
- Date: Fri, 26 Jun 92 22:18:51 GMT
-
- In article <808@cybaswan.UUCP> csandy@cybaswan.UUCP (ap.parkman)
- writes:
- >I am a programmer interested in obtaining some overseas
- >subscriptions to U.S. Mac Magazines such as MacWorld/MacUser
- >which impressed me on a recent visit as being:
- >
- > * Ahead of the U.K. versions in terms of News
- > * Bigger coverage then U.K. versions in terms of more
- > useful articles
- > * Useful for keeping an eye on U.S. Prices for comparison
- > with U.K. Pricing
- >
- >To speed the process of obtaining such a subscription I would
- >ideally like to FAX a subscription request payable against my
- >MasterCard. I was wondering:
- >
- > - What other magazines do you suggest I consider?
- > - Could anyone be kind enough to send me the FAX
- > numbers of the relevant subscription departments
- > ( including MacWorld and MacUser )
- >
- >Andy Parkman
- >e-mail: csandy@uk.ac.swan.pyr
-
- It depends on what you want to read.
-
- For news, I would recommend MacWeek. As a weekly magazine, its focus is
- to deliver the latest news about major dealings in the Macintosh market.
- Its cost is $99 for US, $175 for Canada & Mexico, $300 for International.
- Write to: Customer Service Department, MacWEEK, c/o JCI, P.O. Box
- 1766, Riverton, N.J. 08077-7366
-
- For programming, I would recommend MacTutor. It contains neat
- articles that are of varying benefit depending on your programming
- level on the Mac. (I don't have a copy handy for subscription info)
-
- For reviews and buying information, there's MacWorld and MacUser. As
- monthly publications, their emphasis is to evaluate products and make
- recommendations to end users. (Again, sorry but I don't have a copy
- handy)
-
- Cheers!
- John
-
- +++++++++++++++++++++++++++
-
- From: de19@umail.umd.edu (Dana S Emery)
- Date: 27 Jun 92 02:35:22 GMT
- Organization: Personal
-
- In article <808@cybaswan.UUCP> csandy@cybaswan.UUCP (ap.parkman)
- writes:
- >I am a programmer interested in obtaining some overseas
- >subscriptions to U.S. Mac Magazines such as MacWorld/MacUser
-
-
- Mactutor died, but is now reborn (freindly buyout)
-
- (310) 575-4343
-
- Xplain corp
- po box 250025
- Los Angeles CA, USA 90025-250025
-
- (in US) $40/55 yr (+ $72 source code disks).
-
- April-May 92 issue is first under the new regime.
-
- Dana S Emery. (de19@umail.umd.edu)
-
- ---------------------------
-
- From: cluther@morticia.cnns.unt.edu (Clay Luther)
- Subject: Converting a Unix Sockets-based program to MacTCP
- Organization: University of North Texas
- Date: Thu, 25 Jun 1992 22:59:45 GMT
-
- Can anyone offer advice on taking a simple unix sockets-based program, and
- porting to MacTCP?
-
- For instance, we have need to use ping. We'd like to take the ping source and
- make it a mpw tool.
-
- Just looking for pointers and advice.
-
- Thanks!
-
- - --
- Clay W. Luther cluther@morticia.cnns.unt.edu
- Macintosh/Unix Programmer for Vortech Data, Inc.
- Virtual System Consultant for the UNT Center for Network Neuroscience
- (214) 994-1377
-
- +++++++++++++++++++++++++++
-
- From: veizades@apple.com (John Veizades)
- Date: Fri, 26 Jun 1992 17:15:07 GMT
- Organization: Apple Computer, Inc
-
- In article <cluther.709513185@morticia>, cluther@morticia.cnns.unt.edu (Clay
- Luther) writes:
- >
- > Can anyone offer advice on taking a simple unix sockets-based program, and
- > porting to MacTCP?
- >
- > For instance, we have need to use ping. We'd like to take the ping source and
- > make it a mpw tool.
- >
- > Just looking for pointers and advice.
- >
- On the developer CD starting at number X there are sources and objects to a ping
- tool. The tool is called MPing and it trys to emulate as much of the UNIX ping
- functionality as is possible with the current release of MacTCP.
-
- John Veizades...
- Apple Computer, Inc.
-
- +++++++++++++++++++++++++++
-
- From: jbrowne@void.ncsa.uiuc.edu (Jim Browne)
- Organization: University of Illinois at Urbana
- Date: Sat, 27 Jun 1992 00:59:39 GMT
-
- cluther@morticia.cnns.unt.edu (Clay Luther) writes:
-
- >Can anyone offer advice on taking a simple unix sockets-based program, and
- >porting to MacTCP?
-
- >--
- >Clay W. Luther cluther@morticia.cnns.unt.edu
- >Macintosh/Unix Programmer for Vortech Data, Inc.
- >Virtual System Consultant for the UNT Center for Network Neuroscience
- >(214) 994-1377
-
- You can use the socket library in misc/unsupported on ftp.ncsa.uiuc.edu
-
-
- - --
- Jim Browne | jbrowne@ncsa.uiuc.edu |
- NCSA/STG System Administrator | stgadmin@ncsa.uiuc.edu |
- System Administration: Where the fun never ends... | (217) 244-7798 |
- "I was ionized... but now I'm better." - Bukaroo Banzai
-
- ---------------------------
-
- From: davidp@calvin.usc.edu (David Peterson)
- Subject: How do I dequeue MacTCP calls?
- Date: 25 Jun 1992 17:17:27 -0700
- Organization: University of Southern California, Los Angeles, CA
-
-
-
- Subject about sums it up...
-
- How do I get rid of async MacTCP calls that haven't completed yet?
-
- I can walk through my parameter blocks and find the ones that are inProgress,
- but calling Dequeue() on them tells me they aren't in the queue (or bombs).
- Sure enough, find the driver in Macsbug, and all the fields of dCtlQHdr are
- nil.
-
- So where are they queued, and how do I get rid of them?
-
- Thanks,
- - -dave.
-
- +++++++++++++++++++++++++++
-
- From: resnick@cogsci.uiuc.edu (Pete Resnick)
- Organization: University of Illinois at Urbana
- Date: Fri, 26 Jun 1992 03:38:16 GMT
-
- davidp@calvin.usc.edu (David Peterson) writes:
-
- >How do I get rid of async MacTCP calls that haven't completed yet?
-
- If they are outstanding TCP calls, you can simply use *another*
- parameter block, copy the tcpStream from the PB you want to canel into
- the new PB, set the csCode to TCPAbort or TCPRelease (depending on
- which you really want to do) and call PBControl (usually
- synchronously, but you can do it asynchronously) on the new PB. The
- inProgress PB will complete with connectionTerminated and you will get
- a TCPNotify call with TCPTerminate and the terminReason set to
- TCPULPAbort.
-
- If they are outstanding UDP calls, you can also use another PB, copy
- the udpStream from the PB you want to cancel to the new PB, set the
- csCode to UDPRelease and call PBControl on the new PB. The inProgress
- PB will complete with connectionTerminated as above. ***NOTE*** You
- CAN'T do this if there is an outstanding UDPWrite, only on an
- outstanding UDPRead!! There is no way to cancel an outstanding
- UDPWrite.
-
- >I can walk through my parameter blocks and find the ones that are inProgress,
- >but calling Dequeue() on them tells me they aren't in the queue (or bombs).
- >Sure enough, find the driver in Macsbug, and all the fields of dCtlQHdr are
- >nil.
-
- >So where are they queued, and how do I get rid of them?
-
- Yeah, calling Dequeue would be a really bad idea. The Device Manager
- only allows you to be working on one PB at a time, so MacTCP decided
- to pull the PB's out of the queue and store them internally so that it
- could work on more than one request at a time. That is why you
- actually have to make another PBControl call to get things cancelled.
-
- pr
- - --
- Pete Resnick (...so what is a mojo, and why would one be rising?)
- Graduate assistant - Philosophy Department, Gregory Hall, UIUC
- System manager - Cognitive Science Group, Beckman Institute, UIUC
- Internet: resnick@cogsci.uiuc.edu
-
- +++++++++++++++++++++++++++
-
- From: jstevens@crick.ssctr.bcm.tmc.edu (Jason Philip Stevens)
- Date: 26 Jun 1992 15:56:46 GMT
- Organization: Baylor College of Medicine, Houston, Tx
-
-
- In article <l4kognINN4u6@calvin.usc.edu>, davidp@calvin.usc.edu (David Peterson) writes:
- |>
- |>
- |> Subject about sums it up...
- |>
- |> How do I get rid of async MacTCP calls that haven't completed yet?
- |>
- |> I can walk through my parameter blocks and find the ones that are inProgress,
- |> but calling Dequeue() on them tells me they aren't in the queue (or bombs).
- |> Sure enough, find the driver in Macsbug, and all the fields of dCtlQHdr are
- |> nil.
-
- A queued MacTCP call can be dequeued by calling TCPAbort (MacTCP Developer's
- guide, p.54). This does have unfortunate side effects, however: your connection
- is closed and all outstanding data is lost.
-
- - -jps
-
- - --
- Jason Stevens Internet: jstevens@bcm.tmc.edu
- Network User Services Voice: (713) 798-7370
- Baylor College of Medicine Opinions expressed are mine alone.
-
-
- +++++++++++++++++++++++++++
-
- From: davidp@calvin.usc.edu (David Peterson)
- Date: 26 Jun 1992 11:10:52 -0700
- Organization: University of Southern California, Los Angeles, CA
-
-
-
- Guess I didn't make myself clear enough the first time...
-
- I need to dequeue calls without killing the current connection.
-
- What I'm trying to do is hand the StreamPtr off to another program,
- but I have to kill all pending IO in the current program first.
-
- ---------------------------
-
- From: bowman@reed.edu (Eric Bowman)
- Subject: Does the PolySmooth PicComment work?
- Date: 25 Jun 92 23:56:33 GMT
- Organization: Reed College, Portland, OR
-
- I've attempted make it work, but it appears to have no effect; furthermore,
- it doesn't appear to make any changes to the postscript output. Has any-
- one out there gotten it to work with a LaserWriter?
-
- Thanks,
- bobo
- bowman@reed.edu
-
- +++++++++++++++++++++++++++
-
- From: oster@well.sf.ca.us (David Phillip Oster)
- Organization: Whole Earth 'Lectronic Link
- Date: Fri, 26 Jun 1992 05:45:31 GMT
-
- Develop Magazine in issue 9 or 110 ran an article on extracting the outlines
- from true type fonts. In that article was code for producing a PICT that
- used a quickdraw polygon simulation of a bezier curve when drawn on the
- screen, but when drawn to a postscript printer, it used polysmooth to
- draw the actual bezier curve. It works.
-
- ---------------------------
-
- From: ejohnson@sparc3.cs.uiuc.edu (Eric E Johnson)
- Subject: Why is gray drawing slower than color?
- Organization: University of Illinois at Urbana-Champaign
- Date: Fri, 26 Jun 1992 06:34:15 GMT
-
- Well, after a lot of work, I have some code that will draw color icons
- on the screen at a very rapid rate. But, when I change the settings on
- the screen from color to grays, the rate at which drawing takes place
- drops considerably. I even created icons using a gray palatte, which
- helped a little bit, but the speed it still *very* slow.
-
- Has anyone else had this experience? Does anyone know why this might
- happen?
-
- Eric
- - --
- Eric Johnson | "The American Republic will endure until the day
- ejohnson@suna0.cs.uiuc.edu | Congress discovers that it can bribe the public
- eej37047@uxa.cso.uiuc.edu | with the public's money" - Alexis de Toucqueville
-
- +++++++++++++++++++++++++++
-
- From: buckeye@spf.trw.com (John Wallace)
- Organization: TRW Data Systems Center, Redondo Beach, CA
- Date: Fri, 26 Jun 92 22:39:46 GMT
-
- In article <1992Jun26.063415.19794@sunb10.cs.uiuc.edu> ejohnson@sparc3.cs.uiuc.edu (Eric E Johnson) writes:
- >Well, after a lot of work, I have some code that will draw color icons
- >on the screen at a very rapid rate. But, when I change the settings on
- >the screen from color to grays, the rate at which drawing takes place
- >drops considerably. I even created icons using a gray palatte, which
- >helped a little bit, but the speed it still *very* slow.
- >
- >Has anyone else had this experience? Does anyone know why this might
- >happen?
- >
- >Eric
- >--
- >Eric Johnson | "The American Republic will endure until the day
- >ejohnson@suna0.cs.uiuc.edu | Congress discovers that it can bribe the public
- >eej37047@uxa.cso.uiuc.edu | with the public's money" - Alexis de Toucqueville
-
- It may have to do with pixel depth. For example, drawing it in 256
- colors/grays is faster than drawing in 16 colors/grays. The reason
- being that in 256 colors/grays a pixel takes up 1 byte, but in 16
- colors/grays a pixel takes up 1/2 byte which must be masked in to the
- surrounding data.
-
- As far as I know, there should be no difference in drawing speed
- between colors and grays at the same pixel depth (for the same graphics
- card on the same Macintosh).
-
- Cheers!
- John
- - --------
- John Wallace
-
- +++++++++++++++++++++++++++
-
- From: c9107786@frey.newcastle.edu.au (Dave Leonard)
- Organization: Department of Mathematics, Uni of Newcastle, Oz.
- Date: Sat, 27 Jun 1992 11:58:45 GMT
-
- buckeye@spf.trw.com (John Wallace) writes:
-
- >In article <1992Jun26.063415.19794@sunb10.cs.uiuc.edu> ejohnson@sparc3.cs.uiuc.edu (Eric E Johnson) writes:
- >>Well, after a lot of work, I have some code that will draw color icons
- >>on the screen at a very rapid rate. But, when I change the settings on
- >>the screen from color to grays, the rate at which drawing takes place
- >>drops considerably. I even created icons using a gray palatte, which
- >>helped a little bit, but the speed it still *very* slow.
- >>
- >>Has anyone else had this experience? Does anyone know why this might
- >>happen?
-
- >It may have to do with pixel depth. For example, drawing it in 256
- >colors/grays is faster than drawing in 16 colors/grays. The reason
- >being that in 256 colors/grays a pixel takes up 1 byte, but in 16
- >colors/grays a pixel takes up 1/2 byte which must be masked in to the
- >surrounding data.
-
- >As far as I know, there should be no difference in drawing speed
- >between colors and grays at the same pixel depth (for the same graphics
- >card on the same Macintosh).
-
- It may also be that quickdraw or some pallete managing code is thinking
- about going from a (colourful) grey to a (grey) grey. remember how when
- viewing gifs and you background the viewer, the pallete manager tries to do
- its best to make the gif look okay and not a psycadelic explosion of
- colour? well the same thing might be happening here. Your grey-looking
- icons which are described using RGB are being translated somewhere to come
- up as 8-bit grayscale images.
-
- Just how slow is it? (More than 2 and i'd be surprised)
-
- dave
- - --
- Dave Leonard, Uni of Newcastle c9107786@frey.newcastle.edu.au
- "and you get a linear line" - M. Fu
-
- +++++++++++++++++++++++++++
-
- From: ejohnson@sparc3.cs.uiuc.edu (Eric E Johnson)
- Organization: University of Illinois at Urbana-Champaign
- Date: Sat, 27 Jun 1992 21:18:38 GMT
-
- >>It may have to do with pixel depth. For example, drawing it in 256
- >>colors/grays is faster than drawing in 16 colors/grays. The reason
- >>being that in 256 colors/grays a pixel takes up 1 byte, but in 16
- >>colors/grays a pixel takes up 1/2 byte which must be masked in to the
- >>surrounding data.
-
- My icons are 24x24, which means the 1/2 byte issue won't be a problem.
- And, I'm making sure that the coordinates that I draw to are always byte
- aligned, so that no bit shifting is necessary.
-
- In <1992Jun27.115845.23416@frey.newcastle.edu.au>
- c9107786@frey.newcastle.edu.au (Dave Leonard) writes:
-
- >It may also be that quickdraw or some pallete managing code is thinking
- >about going from a (colourful) grey to a (grey) grey. remember how when
- >viewing gifs and you background the viewer, the pallete manager tries to do
- >its best to make the gif look okay and not a psycadelic explosion of
- >colour? well the same thing might be happening here. Your grey-looking
- >icons which are described using RGB are being translated somewhere to come
- >up as 8-bit grayscale images.
-
- >Just how slow is it? (More than 2 and i'd be surprised)
-
- Its about twice as slow. That's the weird part. Let me give some more
- details on what I'm doing.
-
- I have an offscreen gWorld in which I plot a single color icon (cicn)
- into the gWorld. Then, using some 68000 code, I mass produce it very
- quickly. Then, I use copybits to put it on the screen. Everything
- works perfectly fine under color and its lightning fast, but under gray
- mode, its really slow.
-
- When I create my gWorld, I make sure to use the current color palette of
- the current screen, so copying between the gWorld and the screen would
- still be fast. I also use PlotCIcon to put the color icon into my
- gWorld so PlotCIcon should fix the colors. Keep in mind that I only use
- PlotCIcon once to plot to the offscreen gWorld. I have my own code that
- takes this initial plot and mass produce it. This works fine under
- color, but under grays, the speed goes to hell.
-
- What palette should I use when creating the icons in ResEdit?
-
- - --
- Eric Johnson | "The American Republic will endure until the day
- ejohnson@suna0.cs.uiuc.edu | Congress discovers that it can bribe the public
- eej37047@uxa.cso.uiuc.edu | with the public's money" - Alexis de Toucqueville
-
- +++++++++++++++++++++++++++
-
- From: ejohnson@sparc3.cs.uiuc.edu (Eric E Johnson)
- Organization: University of Illinois at Urbana-Champaign
- Date: Sun, 28 Jun 1992 00:43:55 GMT
-
- I discovered why my grey scale drawings were going so slow. When I
- created my offscreen gWorld, the code that I relied on assumed that the
- default color table was going to be color. So, it was grabbing a
- default color table for color mode. I changed it to check for either
- gray scale or color mode, and then grab the appropriate system colot
- table for the offscreen gWorld.
-
- - --
- Eric Johnson | "The American Republic will endure until the day
- ejohnson@suna0.cs.uiuc.edu | Congress discovers that it can bribe the public
- eej37047@uxa.cso.uiuc.edu | with the public's money" - Alexis de Toucqueville
-
- ---------------------------
-
- End of C.S.M.P. Digest
- **********************
-